<template>
	<view class="content">
		<!-- #ifdef APP-PLUS -->
		<view class="status_bar"><view class="top_view"></view></view>
		<!-- #endif -->
		<view class="NavBar">
			<view class="back" @click="back()"><uni-icons type="arrowleft" :size="28" :color="'#fff'" style="margin-left: -14rpx;"></uni-icons></view>
			<text>划转记录</text>
			<picker @change="setCoin" :value="coinType" :range="coinList">
				<image src="../../../static/nav/transfer.png" mode=""></image>
			</picker>
		</view>
		<view class="list">
			<view class="block">
				<view class="top">
					<view class="left"><text>币币账户转入合约账户</text></view>
					<view class="right">2020-03-02 09:56:24</view>
				</view>
				<view class="btm">
					<view class="left">0.0000 BTC</view>
					<view class="right">划转成功</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
import { uniPopup } from '@dcloudio/uni-ui';
import uniIcons from '@/components/uni-icon/uni-icon.vue';
import HMmessages from '@/components/HM-messages/HM-messages.vue';
import service from '../service.js';
import comSvc from '@/common/comSvc.js';
export default {
	components: {
		uniPopup,
		HMmessages,
		uniIcons
	},
	data() {
		return {
			coinType: 0,
			coinList: ['全部', '法币账户币币账户'],
		};
	},
	onShow() {
		comSvc.getAssets().then(({ data }) => {
			if (data.code == '100200') {
				for (let i = 0; i < data.data.length; i++) {
					if (data.data[i].assetCode == 'USDT') {
						this.number = data.data[i].amountAvailable;
						this.place = '可用：' + data.data[i].amountAvailable;
					}
				}
			}
		});
	},
	onBackPress() {
		if (this.showList !== false) {
			this.showList = false;
			return true;
		}
	},
	methods: {
		//返回
		back() {
			uni.navigateBack();
		},
		//设置类型
		setCoin(e) {
			this.coinType = e.target.value;
		},
	}
};
</script>

<style lang="scss">
@import './style.scss';
</style>
